/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    width: 960px;
    margin: 0 auto;
    padding: 0 10px;
}

/* 头部样式 */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
    border-bottom: 3px solid #34495e;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #ecf0f1;
    text-decoration: none;
}

.user-info {
    font-size: 14px;
}

.user-info a {
    color: #ecf0f1;
    text-decoration: none;
    margin-left: 15px;
    padding: 5px 10px;
    border: 1px solid #ecf0f1;
    border-radius: 3px;
}

.user-info a:hover {
    background-color: #34495e;
}

/* 导航栏样式 */
.navbar {
    background-color: #34495e;
    border-bottom: 2px solid #2c3e50;
}

.nav-menu {
    list-style: none;
    display: flex;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: block;
    padding: 12px 20px;
    color: #ecf0f1;
    text-decoration: none;
    font-weight: bold;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: #2c3e50;
    color: white;
}

/* 主要内容区 */
.main-content {
    display: flex;
    margin: 20px auto;
    gap: 20px;
}

.sidebar {
    width: 200px;
    flex-shrink: 0;
}

.content {
    flex: 1;
    min-width: 0;
}

/* 侧边栏盒子样式 */
.category-box,
.stats-box {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    padding: 15px;
}

.category-box h3,
.stats-box h3 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ecf0f1;
}

.category-box ul {
    list-style: none;
    padding: 0;
}

.category-box li {
    margin-bottom: 8px;
}

.category-box a {
    color: #34495e;
    text-decoration: none;
    display: block;
    padding: 5px;
    border-radius: 3px;
}

.category-box a:hover {
    background-color: #ecf0f1;
    color: #2c3e50;
}

.stats-box p {
    margin-bottom: 8px;
    color: #666;
}

/* 帖子列表头部 */
.post-list-header {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-list-header h2 {
    color: #2c3e50;
    font-size: 18px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-primary {
    background-color: #e74c3c;
}

.btn-primary:hover {
    background-color: #c0392b;
}

/* 帖子列表样式 */
.post-list {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.post-card {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.post-card:last-child {
    border-bottom: none;
}

.post-title {
    font-size: 16px;
    margin-bottom: 10px;
}

.post-title a {
    color: #2c3e50;
    text-decoration: none;
}

.post-title a:hover {
    color: #e74c3c;
}

.post-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.post-meta span {
    margin-right: 15px;
}

.post-stats {
    font-size: 12px;
    color: #999;
}

.post-stats span {
    margin-right: 15px;
}

/* 分页样式 */
.pagination {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pagination a {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 2px;
    border: 1px solid #ddd;
    color: #34495e;
    text-decoration: none;
    border-radius: 3px;
}

.pagination a:hover,
.pagination a.active {
    background-color: #34495e;
    color: white;
    border-color: #34495e;
}

/* 页脚样式 */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 20px 0;
    margin-top: 30px;
    border-top: 3px solid #34495e;
}

.footer p {
    text-align: center;
    font-size: 12px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* 错误消息样式 */
.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 0 15px;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
    }
    
    .nav-menu li {
        flex: 1;
        text-align: center;
    }
}
